<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>导航</title>
    <style>
        ul{
            padding: 0;
            margin: 0;
            list-style: none;
        }
        a{
            text-decoration: none;
        }
        .list{
            height: 33px;
            line-height: 33px;
            width: 1000px;           
        }
        .list>li{/* li只是.list的子元素，不是孙元素的li */
            width: 155px;
            height: 33px;
            background-color: #ccc;
            text-align: center;
            position: relative;
            float: left;
            margin-left: 1px;
        }
        .list>li>a{
            color: #fff;
            letter-spacing: 3px;
            font-weight: bold;/* 加粗 */
        }
        .list ul{
            /* 隐藏元素 */
            display: none;
            position: absolute;
            left: 0;
            top: 33px;
            width: 100%;
        }
        .list ul>li{
            background-color: #ddd;
            margin-bottom: 2px;
            font-size: 14px;
        }
        .list ul a{
            color: #000;
        }

        .list>li:hover ul{
            display: block;/* inline、inline-block */
            /* text-decoration: underline; */
        }

        .list>li>ul>li:hover{
            text-decoration: underline;
        }

    </style>
</head>
<body>
    <ul class="list">
        <li>
            <a href="#">首页</a>
        </li>
        <li>
            <a href="#">新闻</a>
            <ul>
                <li><a href="#">国内新闻</a></li>
                <li><a href="#">国际新闻</a></li>
                <li><a href="#">省内新闻</a></li>
            </ul>
        </li>

        <li>
            <a href="#">体育</a>
            <ul>
                <li><a href="#">羽毛球</a></li>
                <li><a href="#">乒乓球</a></li>
                <li><a href="#">篮球</a></li>
            </ul>
        </li>

        <li>
            <a href="#">新闻</a>
            <ul>
                <li><a href="#">国内新闻</a></li>
                <li><a href="#">国际新闻</a></li>
                <li><a href="#">省内新闻</a></li>
            </ul>
        </li>
    </ul>
</body>
</html>